﻿<UserControl x:Class="ShopMS.Shell.Shell"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <DockPanel>   
        <Menu DockPanel.Dock="Top" VerticalContentAlignment="Center">
                <MenuItem Header="System" VerticalContentAlignment="Center" Height="32">
                    <MenuItem Header="LoginIn"/>
            </MenuItem>
            </Menu>
        <ToolBar DockPanel.Dock="Top" >
            <Button x:Name="btnLogin" Content="Login" VerticalAlignment="Stretch" Click="btnLogin_Click">
            </Button>         
        </ToolBar>
        <TabControl x:Name="tcMain">
            <TabItem Header="Home" x:Name="tiHome">
                <Grid Background="#FFE5E5E5">
                    <!--<Grid.ColumnDefinitions>
                        <ColumnDefinition Width="20*"></ColumnDefinition>
                        <ColumnDefinition Width="80*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>-->
                    <ListBox Name="lstFunction" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <WrapPanel/>
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid Width="128" MouseLeftButtonDown="Function_MouseDown">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="64"/>
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Image Source="{Binding Path=funIconTitle}" />
                                    <Label Content="{Binding Path=funName}" Grid.Row="1" HorizontalAlignment="Center"/>
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>          
            </TabItem>
        </TabControl>
    </DockPanel>
</UserControl>
